package com.market.mapper;

import com.market.dto.ShopCartDto;
import com.market.entity.ShopCart;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;
@Mapper
public interface ShopCartMapper {
    List<ShopCartDto> selectShopCartByBuyerId(int buyerId);

    int addShopCart(ShopCart shopCart);

    int deleteShopCart(int buyerId, int goodsId);

    int addShopCartNums(int buyerId, int goodsId);

    int reduceShopCartNums(int buyerId, int goodsId);

    int updateShopCartNums(int buyerId,int goodsId,int nums);

    ShopCart selectShopCartByBuyerIdAndGoodsId(int buyerId,int goodsId);
}
